feat: Implement TagSelector Component for Event Tagging#384
Merged
lishmanTech merged 1 commit intoGatheraa:mainfrom Mar 29, 2026
Merged
feat: Implement TagSelector Component for Event Tagging#384lishmanTech merged 1 commit intoGatheraa:mainfrom
lishmanTech merged 1 commit intoGatheraa:mainfrom
Conversation
…raa#371) - Add TagSelector component with full keyboard support: * Enter/Comma to add tags * Backspace to remove last tag * Arrow keys to navigate autocomplete suggestions * Escape to close suggestions - Prevent duplicate tags (case-insensitive) - Max 10 tags per event, 20 characters per tag - Autocomplete suggestions with 6-item dropdown - Integrate into CreateEventForm with validation - Update event schema to include tags field with zod validation - Add fallback error handling with inline TailwindCSS styling - Storybook stories and unit tests included - All acceptance criteria met: add/remove, keyboard support, duplicates, autocomplete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #371
Overview
Implemented a reusable
TagSelectorcomponent in the UI atoms library with full keyboard support, duplicate prevention, and autocomplete suggestions. The component is now integrated into the event creation form, allowing users to attach up to 10 tags (20 characters each) to each event.Changes
New Component:
TagSelectorapp/frontend/components/ui/atoms/TagSelector/TagSelector.tsx– Main component with keyboard support, autocomplete, and inline validationTagSelector.stories.tsx– Storybook stories for visual developmentTagSelector.test.tsx– Unit tests for keyboard interactions and edge casesindex.ts– Public exportsFeatures Implemented
✅ Acceptance Criteria
Add/Remove Tags
Keyboard Support
Prevent Duplicates
Autocomplete Suggestions
Integration
app/frontend/components/forms/CreateEventForm.tsx– IntegratedTagSelectorwithreact-hook-formControllerapp/frontend/components/forms/schema/eventSchema.ts– Addedtagsfield with zod validation (max 10 tags, each 1–20 chars)app/frontend/components/ui/atoms/index.ts– Exported new componentValidation
Styling & UX
Testing
Files Changed
app/frontend/
├── components/
│ ├── ui/atoms/
│ │ ├── TagSelector/
│ │ │ ├── TagSelector.tsx (NEW – 203 lines)
│ │ │ ├── TagSelector.stories.tsx (NEW – 59 lines)
│ │ │ ├── TagSelector.test.tsx (NEW – 52 lines)
│ │ │ └── index.ts (NEW)
│ │ └── index.ts (MODIFIED – added exports)
│ └── forms/
│ ├── CreateEventForm.tsx (MODIFIED – 48 lines added)
│ └── schema/eventSchema.ts (MODIFIED – tags field + defaults)
How to Test Locally
npm run dev/events/create(event organizer required)Backend Compatibility
✅ Backend already supports tags in:
CreateEventDto(optional string array)Eventmodel interfaceNo backend changes required.
Storybook
View component stories locally:
npm run storybook→ Navigate toUI/Atoms/TagSelector